<include file="Public:header" xmlns="http://www.w3.org/1999/html"/>
<div class="w_l mr10">
    <div class="mlclist box_shadow">
        <div class="conreg">
            <div class="regtit"><span class="f8c">个人资料</span><span class="f6">设置</span></div>
            <!--基本资料-->
            <div class="hmbow1">
                <div class="hmtop">
                    <a href="javascript:;">基本资料<img src="__STATIC__/home/img/hpage1.jpg"></a>
                </div>
                <div class="hmcon mt20">
                    <form action="{:U('/member/update',false,false)}" method="post">
                        <div class="h">
                            <div class="name"><span class="f16">昵称：</span></div>
                            <div class="con">
                                <input type="text" class="texs" name="name" value="{$user.name}"/>
                            </div>
                        </div>
                        <div class="h">
                            <div class="name"><span class="f16">性别：</span></div>
                            <div class="con">
                                <input type="radio" value="1" name="sex"
                                <if condition="intval($user['sex']) == 1"> checked="checked"</if>
                                >&nbsp;男&nbsp;&nbsp;
                                <input type="radio" value="2" name="sex"
                                <if condition="intval($user['sex']) == 2"> checked="checked"</if>
                                >&nbsp;女
                            </div>
                        </div>
                        <div class="h">
                            <div class="name"><span class="f16">邮箱：</span></div>
                            <div class="con">
                                <label>{$user.email}</label>
                            </div>
                        </div>
                        <div class="h">
                            <div class="name"><span class="f16">生日：</span></div>
                            <div class="con">

                                <select name="year" id="year" class="spe">
                                    <option value="{$user.birthday|date=" Y
                                    ",###}">
                                    {$user.birthday|date="Y",###}
                                    </option>
                                </select>
                                <select name="month" id="month" class="spe">
                                    <option value="{$user.birthday|date=" m
                                    ",###}">
                                    {$user.birthday|date="m",###}
                                    </option>
                                </select>
                                <select name="day" id="day" class="spe">
                                    <option value="{$user.birthday|date=" d
                                    ",###}">
                                    {$user.birthday|date="d",###}
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="h mt20">
                            <div class="name">&nbsp;</div>
                            <div class="con">
                                <a href="javascript:;" onclick="doSubmit(0);" class="sq">提交修改</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!--修改密码-->
            <div class="hmbow1">
                <div class="hmtop">
                    <a href="javascript:;">修改密码<img src="__STATIC__/home/img/hpage1.jpg"></a>
                </div>
                <div class="hmcon mt20">
                    <form action="{:U('/member/passwd',false,false)}" method="post">
                        <div class="h">
                            <div class="name"><span class="f16">当前密码：</span></div>
                            <div class="con"><input type="password" class="texs" name="nowpwd"/></div>
                        </div>
                        <div class="h">
                            <div class="name"><span class="f16">新密码：</span></div>
                            <div class="con">
                                <input type="password" class="texs" name="pwd" id="pwd"/>
                                密码强度:<span id="complexity" style="color: red;" title="密码强度">0%</span>
                            </div>
                        </div>
                        <div class="h">
                            <div class="name"><span class="f16">新密码确认：</span></div>
                            <div class="con">
                                <input type="password" class="texs" name="repwd"/>
                            </div>
                        </div>
                        <div class="h mt20">
                            <div class="name">&nbsp;</div>
                            <div class="con">
                                <a href="javascript:;" onclick="doSubmit(1);" class="sq">提交修改</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!--手机绑定-->
            <div class="hmbow1">
                <div class="hmtop">
                    <a href="javascript:;">手机绑定<img src="__STATIC__/home/img/hpage1.jpg"></a>
                </div>
                <div class="hmcon mt20">
                    <if condition="$user['isPhone']">
                        <div class="h">
                            <div class="name"><span class="f16">手机号码：</span></div>
                            <div class="con">{$user.phone}</div>
                        </div>
                        <else/>
                        <form action="{:U('/member/phone')}" method="post">
                            <div class="h">
                                <div class="name"><span class="f16">手机绑定：</span></div>
                                <div class="con">
                                    <input type="text" class="texs" name="phone" id="phone" maxlength="11"/>
                                    <a class="copy" href="javascript:;" id="sendSms">获取验证码</a>
                                </div>
                            </div>
                            <div class="h">
                                <div class="name">
                                    <span class="f16">验证码：</span>
                                </div>
                                <div class="con">
                                    <input type="text" class="texs" name="verify" />
                                </div>
                            </div>
                            <div class="h mt20">
                                <div class="name">&nbsp;</div>
                                <div class="con">
                                    <a href="javascript:;" class="sq" onclick="doSubmit(2);">确认绑定</a>
                                </div>
                            </div>
                        </form>
                    </if>
                </div>
            </div>
            <!--账号绑定-->
            <div class="hmbow1" style="border-bottom:none;">
                <div class="hmtop">
                    <a href="javascript:;">账号绑定<img src="__STATIC__/home/img/hpage1.jpg"></a>
                </div>
                <div class="hmcon mt20">
                    <ul class="nobd">
                        <li><img src="__STATIC__/img/weibo64x64.png">

                            <h3 class="name">新浪微博</h3>

                            <p class="name2">[<if condition="$binds['weibo']">
                                <a href="{:U('/oauth/unbind/weibo')}">解除绑定</a>
                                <else />
                                <a href="{:U('/oauth/bind/weibo')}">绑定账号</a>
                            </if>]</p>
                        </li>
                    </ul>
                </div>
            </div>

        </div>
    </div>
</div>
<include file="Member:nav"/>
<include file="Public:footer"/>
<script type="text/javascript">
    $(function () {
        $("#year").sDate();
        $("#pwd").complexify({}, function (valid, complexity) {
            $('#complexity').html(Math.round(complexity) + '%');
        });
        $("#sendSms").click(function () {
            var phone = $("#phone").val();
            if (phone) {
                $.getJSON(m.app + "/member/send/sms?phone=" + phone, function (data) {
                    if (data.status == 1) {
                        alert(data.data);
                    } else {
                        alert(data.data);
                    }
                });
            } else {
                alert('手机号码必须填写！');
            }
        });
    });
</script>